tests/sizes.js: Fix byte array unpacking
authorDan Nicholson <nicholson@endlessm.com>
Mon, 8 Jul 2019 21:08:07 +0000 (15:08 -0600)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 23 Jul 2019 12:49:26 +0000 (12:49 +0000)
commit615861443be250cba16d674a6b3c7f96c8b842de
tree8809d1c2435968fc63cb4f9aa4b98ebc9c3ed9a5
parent2312caad7633d7aae11adebd87e4f932431bf49a
tests/sizes.js: Fix byte array unpacking

Recent GJS changed how byte arrays are unpacked with some assumptions
that they are likely strings. Manually use get_child_value() and
get_byte() to ensure the correct value is parsed when checking the
`ostree.sizes` metadata.

The upstream test is currently passing fine with GJS 1.56.2, but at
Endless we (unfortunately) have a downstream change that adds the object
type as an additional byte in the array. This is parsed incorrectly by
`deep_unpack()`. We can carry this patch downstream, but this change
makes the test more robust regardless.

Closes: #1884
Approved by: cgwalters
tests/test-sizes.js